
	import {
		ref,
		onMounted,
		onUnmounted
	} from 'vue'
export default function(){
	
	const headerShow = ref(false); //  头部状态
	
	
	onMounted(() => {
	
		window.onscroll = function(e) {
	
			let top = document.documentElement.scrollTop;
	
			headerShow.value = top > 50
	
		}
	
	})
	
	onUnmounted(() => {
		window.onscroll = null
	})
	
	return {
		headerShow
	}
	
}